<template>
    <view id="top" v-if="setInfo && setInfo.project_info && setInfo.project_info.plan_name">
		<view class="daochu-box">
		    <view class="xunjian-list">
		        <view class="xunjian-flex">
		            <view class="xunjian-title xunjian-title-top">{{setInfo.project_info.plan_name}}</view>
					<view class="xunjian-b">
					<view>任务周期：<text class="xunjian-blue">{{setInfo.project_info.begintime}} {{setInfo.project_info.endtime == '' ? '- 长期' : setInfo.project_info.begintime == setInfo.project_info.endtime ? '' : '- '+setInfo.project_info.endtime}}</text></view>
		            <view>周期：每{{setInfo.project_info.circle_type == 1 ? '日' : setInfo.project_info.circle_type == 2 ? '周' : '月'}}巡检</view>
					<view>时间：<text class="xunjian-time">{{setInfo.project_info.times}}</text></view>
		        </view></view>
		    </view>
		</view>
		
        <!-- <view class="dz-from" style="display: flex;flex-direction: column;align-items: self-start;" v-show="isshow">
            <view style="padding-bottom: 10px">{{setInfo.detail.site_name}}</view>
            <view class="dz-from-time">
                <view style="flex: 1;display: flex;align-items: center;flex-direction: column;">
                    <view class="dz-from-time">
                        <view class="iconfont icon-shijian"></view>
                        <view>开始时间:</view>
                        <view class="xunjian-list-r">{{setInfo.detail.begintime}}</view>
                    </view>
                    <view class="dz-from-time">
                        <view class="iconfont icon-shijian"></view>
                        <view>结束时间:</view>
                        <view class="xunjian-list-r">{{setInfo.detail.endtime}}</view>
                    </view>
                </view>
            </view>
        </view> -->
		<view class="xunjian-detail">
		<view class="xunjian-detail-title"><text>巡检点</text>{{setInfo.project_site_info.site_name}}</view>
        <view class="dz-from dz-from-column" v-if="isshow && setInfo.data.length > 0" style="padding-bottom:0;">
            <view class="dz-jcx">
                <view>检查项</view>
                <view class="dz-from-jc" style="width: 100px;">
                    <view>正常</view>
                    <view>异常</view>
                </view>
            </view>
            <view class="dz-jcx" style="display: flex;align-items: center;justify-content: space-between;"
                  v-for="(item,index) in setInfo.data" :key="index">
                <view class="dz-jcx-l">
                    <view class="dz-jcx-no">{{index+1}}</view>
                    {{item.item_name}}
                </view>
                <radio-group v-if="item.type == 1" class="dz-from-jc" @change="radioChange(index,$event)">
                    <label class="uni-list-cell uni-list-cell-pd" v-for="(ite, ind) in item.check" :key="ite">
                        <view>
                            <radio :value="ite" :checked="(item.value) == ite" color="#4d72ff"
                                   style="transform:scale(0.85)" :disabled="!canEdit"/>
                        </view>
                    </label>
                </radio-group>
                <textarea :value="item.status == 0 ? '' : item.value" auto-height="true" class="dz-jcx-input"
                          :id="index + '_' +item.id" v-if="item.type == 2" @blur="gettext" type="text" :disabled="!canEdit"/>
            </view>
        </view>
        <view class="dz-from-bz" v-if="setInfo.project_site_info.verify == 1 && canEdit" style="padding-bottom: 0;">
            <view>巡检定位</view>
            <view class="dz-wei-content" v-if="positionRight != -1">{{positionRight == true ? '位置正确' : "不在可提交范围"}}
            </view>
            <view class="dz-wei">
                <view class="iconfont icon-weizhi"></view>
                <button :loading="isGetPosition" @tap="getPosition()" size="mini" class="dz-wei-button">获取当前位置</button>
            </view>
			<map v-if="showMap" style="width: 100%; height: 180px;" :latitude="setInfo.requestParams.lat "
			:longitude="setInfo.requestParams.lng" :markers="covers" :circles="circles" scale="18"
			styel="margin-top:10px;display: flex;">
			</map>
        </view>
        <view class="dz-from-bz" v-show="isshow" style="padding-bottom:0;">
            <view>备注</view>
            <view class="dz-from-bz-text">
                <textarea v-model="content" auto-height :placeholder="placeholder" :disabled="!canEdit"/>
                <view class="dz-from-fj">
                    <view ref="input" class="input"></view>
                    <fileUploader limitsize="10240" @get-img="getImg" v-if="canEdit"></fileUploader>
                    <view class="dz-from-fj-edit" v-for="(item,index) in lastimgArr" :key="index">
                        <image :src="item" class="dz-from-fj-img-img"></image>
                    </view>
                </view>
            </view>
        </view>
        <view class="dz-from" v-show="isshow">
            <view>巡检结果</view>
            <view class="dz-from-jc" style="width: 136px;">
                <radio-group class="dz-from-time dz-just" @change="radioResultChange">
                    <label class="dz-from-time">
                        <radio value="1" :checked="state == 1" color="#4d72ff" style="transform:scale(0.85)" :disabled="!canEdit"/>
                        <view>正常</view>
                    </label>
                    <label class="dz-from-time">
                        <radio value="-1" :checked="state == -1" color="#4d72ff" style="transform:scale(0.85)" :disabled="!canEdit"/>
                        <view>异常</view>
                    </label>
                </radio-group>
                <!-- <view style="display: flex; align-items: center;"><radio :value="ite" :checked="(item.id+'_'+item.status) == ite"/>正常</view>
                <view style="display: flex; align-items: center;"><radio :value="ite" :checked="(item.id+'_'+item.status) == ite"/>异常</view> -->
            </view>
        </view>
		</view>
		<view class="lz-modal lz-modal-show" v-show="isshow && canEdit && state == -1 && showWorkOrder">
			<view class="lz-modal-dialog">
				<view class="lz-list">
					<view class="lz-list-header" style="justify-content: center">
						提示
					</view>
					<view class="lz-list-text">
						是否需要生成工单？
					</view>
					<view v-if="!showSetLevel" class="weixiu-b">
						<button @tap="showWorkOrder = false">否</button>
						<button @tap="setCreateOrder" class="weixiu-b-r">是</button>
					</view>
				</view>
				<view class="lz-margin--b-md"></view>
			</view>
		</view>
        <view class="dz-from-button" v-show="isshow && setInfo.project_site_info.status ==0">
            <button type="primary" @tap="showSubmit">确认提交</button>
        </view>
		<view class="project-title">巡检列表</view>
		<view class="xunjian-z-list-content">
		<view class="xunjian-z-list" v-for="(item,index) in setInfo.project_info.sites.data" :key="index">
		    <view class="xunjian-z-list-flex" @tap="goto_detail(item)">
		        <view class="xunjian-z-title">
					<view style="flex: 1;font-size: 15px;">{{item.area_name}}-{{item.site_name}}</view>
					<view class="xunjian-title-r">
						<text v-if="item.status == 0" class="pub-blue">待巡检</text>
						<text v-else-if="item.status == 1" class="pub-green">已巡检</text>
						<text v-else-if="item.status == -1" class="pub-green">漏检</text>
						<view class="iconfont icon-youjiantou"></view></view>
				</view>
				<!-- status状态 0待巡检 1已巡检 -1漏检 -->
				
				<view v-if="item.status == 1 && item.checktime != 0" class="xunjian-z-b">
					巡检时间：<text class="xunjian-time">{{$lib.$utils.timestampToTime(item.checktime)}}</text>
				</view>
		    </view>
		</view>
		</view>
		<view style="height: 20px;"></view>
    </view>
</template>

<script>
    import {mapState} from 'vuex';
    import util from '@/lib/utils/index.js';
    import fileUploader from '@/components/fileUploader/fileUploader.vue'

    export default {
        data() {
            return {
				showWorkOrder:true,//提示是否提交工单，默认显示
				showSetLevel:false,
				canEdit:true,
				placeholder:"请输入备注信息(选填)",
                id: 0,
                state: 0,//整个巡检点是否正常
                ifAllChecked: false,//是否完成全部巡检项目
                isGetPosition: false,//是否正在验证位置信息
                positionRight: -1,//当前位置是否在允许提交范围内
                isshow: false,
                code: '',
                setInfo: {
                    requestParams: {
                        lng: '',//经度
                        lat: '',//纬度
                        site_id: 0,
                    },
					userLocation:{
						lng: '',//经度
						lat: '',//纬度
					},
                    data: [],
					project_info:{},
					project_site_info:{},
                },
                content: '',
                num: 0,
                Arr: [],
                uploadArr: [],
                lastimgArr: [],
                imgArr: [],
                itemKey: [],
                itemValue: [],
                item: [],
                static_media: '',
				
				title: 'map',
				covers: [],
				circles:[],
				showMap:false,
				distance:0,//定位允许误差 米
            }
        },
        components: {fileUploader},
        computed: {
            ...mapState([
                "userInfo"
            ]),
        },
        onLoad(opts) {
			// this.getPosition();
            this.static_media = this.$lib.$config.api
            if (opts.id) {
                this.id = opts.id
                this.setInfo.requestParams.site_id = opts.id
				this.getSet()
				this.getPosition();
            }
			if(opts.code){
				this.code = opts.code
				this.getCodeInfo(this.code);

			}
        },
        onShow() {
            if (this.userInfo.token == undefined) {
                this.loginOut();
            }
        },
        methods: {
			//根据二维码获取详情
			async getCodeInfo(code){
				let res = await this.$lib.$http.post({
					url:this.$lib.$urlMap.codeInfo,
					data:{
						code:code
					},
					needLogin:true
				})
				if(res.code == 1){
					this.id = res.data.project_site_info.id
					this.getPosition();
					this.distance = res.data.project_site_info.distance
					
					let lnglat = res.data.project_site_info.lnglat.split(',')
					this.setInfo.requestParams.lng = lnglat[0]
					this.setInfo.requestParams.lat = lnglat[1]
					this.setCovers(this.setInfo.requestParams.lat,this.setInfo.requestParams.lng)
					this.setCircles(this.setInfo.requestParams.lat,this.setInfo.requestParams.lng)
					
					this.canEdit = res.data.project_site_info.status == 0 ? true : false
					this.isshow = true
					this.lastimgArr = []
					this.state = res.data.project_site_info.result
					if(res.data.data.length == 0){
						this.ifAllChecked = true
					}else{
						this.itemValue = [];
						 this.itemKey = []
						for (let i = 0, leng = res.data.data.length; i < leng; i++) {
							this.$set(res.data.data[i], 'check', ['2', '1'])
							
						    this.itemValue.push(res.data.data[i].value== undefined ? '' : res.data.data[i].value)
						    this.itemKey.push(res.data.data[i].id)
						}
					}
					if (res.data.project_site_info.images) {
					    this.lastimgArr = res.data.project_site_info.images
					}
					this.$set(this.setInfo,'data',JSON.parse(JSON.stringify(res.data.data)))
					this.setInfo.project_info = res.data.project_info
					this.setInfo.project_site_info = res.data.project_site_info
					
					this.content = this.setInfo.project_site_info.content == null ? '' : this.setInfo.project_site_info.content
					this.ifChecked()
				}else{
					uni.showToast({
					    icon: 'none',
					    title: res.msg,
					    duration: 2000
					})
					setTimeout(()=>{
						uni.navigateBack()
					},1500)
				}
			},
			setCreateOrder(){
				// console.log(this.setInfo.project_site_info.site_name)
				this.showWorkOrder = false;
				uni.navigateTo({
					url:'/pages/workOrder/createOrder?area_id=' + this.setInfo.project_site_info.area_id + 
					'&area_site_id=' + this.setInfo.project_site_info.area_site_id + 
					'&site_name=' + this.setInfo.project_site_info.site_name
				})
			},
			goto_detail(item){
				this.Arr = [];
				this.uploadArr = []
				this.lastimgArr = []
				this.imgArr =  []
				this.itemKey =  []
				this.itemValue =  []
				this.item =  []
				this.state = 0
				this.setInfo.requestParams.site_id = item.id
				this.$set(this.setInfo,'data',[])
				this.getSet()
				this.getPosition();
			},
            loginOut() {
                this.$lib.$store.commit('clearUserInfo')
                uni.reLaunch({
                    url: '/pages/login/index'
                })
            },
            //获取巡检项目type =2的input输入内容
            gettext(e) {
                let arr = e.currentTarget.id.split("_")
                let index = arr[0]
                let key = arr[1]
                let value = e.detail.value
                // console.log(this.itemValue[index])
                if (this.itemKey[index] == key) {
                    // this.itemValue[index] = value
                    this.$set(this.itemValue, index, value)
                }
                this.ifChecked()
            },
            getImg(data) {
                this.imgArr = data
                this.imgArr.push(...this.lastimgArr)
                // console.log(this.imgArr)
            },
            showSubmit() {
                let that = this

                //需要验证位置信息的，位置是否正确
                if (this.setInfo.project_site_info.verify == 1 && this.positionRight == false) {
                    uni.showModal({
                        title: '提示',
                        content: '当前位置不在可提交范围内',
                        showCancel: false,
                        success: function (res) {
                            if (res.confirm) {
                                console.log('用户点击确定');
                            } else if (res.cancel) {
                                console.log('用户点击取消');
                            }
                        }
                    });
                    return
                } else if (this.setInfo.project_site_info.verify == 1 && this.positionRight == -1) {
                    uni.showModal({
                        title: '提示',
                        content: '请先获取当前位置',
                        showCancel: false,
                        success: function (res) {
                            if (res.confirm) {
                                console.log('用户点击确定');
                            } else if (res.cancel) {
                                console.log('用户点击取消');
                            }
                        }
                    });
                    return
                }

                //检查项是否都填写
                if (!this.ifAllChecked) {
                    uni.showModal({
                        title: '提示',
                        content: '检查项有未填写的项目',
                        showCancel: false,
                        success: function (res) {
                            if (res.confirm) {
                                console.log('用户点击确定');
                            } else if (res.cancel) {
                                console.log('用户点击取消');
                            }
                        }
                    });
                    return
                }else if(this.state == 0){
					uni.showToast({
						title:'请选择巡检结果是否正常',
						icon:'none',
						duration:2000
					})
					return
				}

                uni.showModal({
                    title: '提示',
                    content: '确认提交？',
                    success: function (res) {
                        if (res.confirm) {
                            that.submit();
                        } else if (res.cancel) {
                            console.log('用户点击取消');
                        }
                    }
                })
            },
            //巡检项是否全部已检
            ifChecked() {
                const items = this.itemValue
                for (let i = 0, leng = items.length; i < leng; i++) {
                    const item = items[i]
                    if (item == "") {
                        this.ifAllChecked = false
                        return
                    }
                }
                this.ifAllChecked = true
            },
            async submit() {
                let data = {}
                if (this.setInfo.project_site_info.verify == 1) {
                    data = {
                        project_site_id: this.setInfo.project_site_info.id,
                        lat: this.setInfo.userLocation.lat,
                        lng: this.setInfo.userLocation.lng,
                        item_key: this.itemKey,
                        item_value: this.itemValue,
                        result: this.state,
                        // status: 1,
                        images: this.imgArr,
                        content: this.content,
                    }
                } else {
                    data = {
                        project_site_id: this.setInfo.project_site_info.id,
                        item_key: this.itemKey,
                        item_value: this.itemValue,
                        result: this.state,
                        // status: 1,
                        images: this.imgArr,
                        content: this.content,
                    }
                }
			
                let res = await this.$lib.$http.post({
                    url: this.$lib.$urlMap.addSite,
                    data: data,
                    needLogin: true
                })
                if (res.code == 1) {
                    uni.showToast({
                        title: '提交成功',
                        duration: 2000
                    })
                    setTimeout(() => {
                        uni.navigateBack({
                            delta: 1
                        });
                    }, 2000)
                } else {
                    uni.showToast({
                        icon: 'none',
                        title: res.msg,
                        duration: 2000
                    })
                }
            },
            getPosition() {
                let that = this
                this.isGetPosition = true
                uni.getLocation({
                    type: 'gcj02',
                    success: function (res) {
                        uni.hideLoading()
						that.setInfo.userLocation.lng = res.longitude
						that.setInfo.userLocation.lat = res.latitude
						that.setCovers();
                        that.checkPostion();
                    },
                    fail: function (err) {
                        that.isGetPosition = false
                    }
                });
            },
			setCovers(){
				this.covers = []
				this.circles = []
				let site= {
					id:1,
					latitude:this.setInfo.requestParams.lat,
					longitude:this.setInfo.requestParams.lng,
					iconPath: '../../static/img/location.png',
					width:20,
					height:20,
					anchor:{x: .5, y: .5} 
				}
				this.covers.push(site)
				this.covers.push({
					id:2,
					latitude:this.setInfo.userLocation.lat,
					longitude:this.setInfo.userLocation.lng,
					iconPath: '../../static/img/userLocation.png',
					width:20,
					height:20,
					anchor:{x: .5, y: .5} 
				})
				let circles = {
					latitude: this.setInfo.requestParams.lat,
					longitude: this.setInfo.requestParams.lng,
					color:'#4d72ff',
					fillColor:'#e0e0e0',
					radius:this.distance
				}
				this.circles.push(circles)
				this.showMap = true
			},
			setCircles(lat,lng){
				return 
				this.circles = []
				let circles = {
					latitude: lat,
					longitude: lng,
					color:'#4d72ff',
					fillColor:'#e0e0e0',
					radius:this.distance
				}
				this.circles.push(circles)
				
			},
            async checkPostion() {
                let res = await this.$lib.$http.post({
                    url: this.$lib.$urlMap.checkPosition,
                    data: {
                        project_site_id: this.id,
                        lng: this.setInfo.userLocation.lng,
                        lat: this.setInfo.userLocation.lat
                    },
                    needLogin: true
                })
                if (res.code == 1) {
                    this.positionRight = true
                    this.isGetPosition = false
                } else {
                    this.positionRight = false
                    this.isGetPosition = false
                }
            },
            //获取巡检点信息
            async getSet() {
                let res = await this.$lib.$http.post({
                    url: this.$lib.$urlMap.siteInfo,
                    data: {
                        project_site_id: this.setInfo.requestParams.site_id
                    },
                    needLogin: true
                })
                if (res.code == 1) {
					this.distance = res.data.project_site_info.distance
					let lnglat = res.data.project_site_info.lnglat.split(',')
					this.setInfo.requestParams.lng = lnglat[0]
					this.setInfo.requestParams.lat = lnglat[1]
					this.setCovers(this.setInfo.requestParams.lat,this.setInfo.requestParams.lng)
					this.setCircles(this.setInfo.requestParams.lat,this.setInfo.requestParams.lng)
					this.canEdit = res.data.project_site_info.status == 0 ? true : false
                    this.isshow = true
                    this.lastimgArr = []
					this.state = res.data.project_site_info.result
					
					if(res.data.data.length == 0){
						this.ifAllChecked = true
					}else{
						this.itemValue = [];
						 this.itemKey = []
						for (let i = 0, leng = res.data.data.length; i < leng; i++) {
							this.$set(res.data.data[i], 'check', ['2', '1'])
							
						    this.itemValue.push(res.data.data[i].value== undefined ? '' : res.data.data[i].value)
						    this.itemKey.push(res.data.data[i].id)
						}
					}
                    if (res.data.project_site_info.images) {
                        this.lastimgArr = res.data.project_site_info.images
                    }
					this.$set(this.setInfo,'data',JSON.parse(JSON.stringify(res.data.data)))
					this.setInfo.project_info = res.data.project_info
					this.setInfo.project_site_info = res.data.project_site_info

                    this.content = this.setInfo.project_site_info.content == null ? '' : this.setInfo.project_site_info.content
					this.ifChecked()
					
					
					uni.pageScrollTo({
						scrollTop: 0,
						duration: 300
					});
				} else {
                    uni.showToast({
                        title: res.msg,
						icon: 'none',
                        duration: 2000
                    });
					setTimeout(()=>{
						uni.navigateBack()
					},1500)
                }
            },
			
            //巡检项目正常或异常状态
            radioChange: function (index,evt) {
				this.itemValue[index] = evt.target.value
                this.ifChecked()
            },
            radioResultChange: function (evt) {
                this.state = evt.target.value
				if(this.state == 1){
					this.showWorkOrder = true
				}
            },
            //填写巡检备注
            bindTextAreaBlur(e) {
                this.content = e.detail.value
                // console.log(this.content)
            },
            formatTime(time) {
                time = (time == 0) ? 0 : util.timestampToTime(time)
                return time
            },
        }
    }
</script>

<style>
    page {
        background: #f5f5f5
    }
    .daochu-box {
        font-size: 16px;
        padding-top: 14px;
    }

    .xunjian-list {
		padding: 14px 0;
		display: flex;
		align-items: self-start;
		background: #fff;
		border-radius: 5px;
		box-shadow: 1px 2px 4px rgb(2 2 2 / 5%);
		width: 93%;
		margin: 0 auto;
		margin-bottom: 14px;
		flex-direction: column;
	}

    .xunjian-flex {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        font-size: 16px;
		width: 100%;
    }
	.xunjian-title {
		display: flex;
		align-items: center;
		padding: 0 14px;
		font-size: 14px;
	}
	.xunjian-title-top  {
		border-bottom: solid 1px #f3f3f3;
		margin-bottom: 10px;
		padding-bottom: 14px;
		font-size: 16px;
		justify-content: space-between;
	}
	.xunjian-b{
		width: 92%;
		margin: 0 auto;
		font-size: 14px;
		line-height: 24px;
	}
    .xunjian-time {
        color: #9b9b9c;
    }
	.xunjian-blue {
		color: #313131;
		font-weight: bold;
	}
	.uni-fab__content--other-platform{
		box-shadow:none!important;
	}
	.xunjian-title-r {
		font-size: 14px;
		display: flex;
		align-items: center;
	}
	.xunjian-title-r text{margin-right: 4px;}
	.xunjian-z-list-content{
		margin-top: 9px;
		font-size: 14px;
		width: 100%;
	}
	.xunjian-z-title{
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 92%;
		padding: 0 14px;
	}
	.xunjian-z-list{
		width: 93%;
		background: #fff;
		margin-bottom: 12px;
		margin: 0 auto 12px;
		border-radius: 5px;
		box-shadow: 1px 2px 4px rgb(2 2 2 / 5%);
	}
	.xunjian-z-list-flex{
	    padding: 14px 0;
	    display: flex;
	    align-items: flex-start;
		flex-direction: column;
	}
	.project-title{
		font-size: 14px;
		color: #7b7b7b;
		width: 93%;
		margin: 0 auto 12px;
	}
	.xunjian-title-r .iconfont{
	    font-size: 14px;
		margin-top: 2px;
	}
	.xunjian-z-b{
		width: 100%;
		padding: 8px 15px 0;
	}

    .dz-from {
        display: flex;
        padding: 14px;
        width: 90%;
        margin: 0 auto;
        justify-content: space-between;
        align-items: center;
        font-size: 16px;
    }

    .dz-from-bz {
        display: flex;
        padding: 18px;
        width: 90%;
        margin: 0 auto;
        align-items: flex-start;
        flex-direction: column;
        font-size: 16px;
    }

    .dz-from-time {
        display: flex;
        align-items: center;
        font-size: 15px;
    }

    .dz-from-top .dz-from-time:first-child {
        margin-bottom: 3px;
    }

    .dz-from .iconfont {
        font-size: 18px;
        color: #8d8d8d;
        margin-right: 3px
    }

    .dz-line {
        background: #fafafa;
        height: 8px;
    }

    .dz-from-column {
        flex-direction: column;
    }

    .dz-from .dz-jcx {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        flex: 1;
        margin-bottom: 18px;
    }

    .dz-from .dz-jcx:last-child {
        margin-bottom: 0;
    }

    .dz-jcx-l {
        flex: 1;
        margin-right: 14px;
        width: 70%;
        display: flex;
        align-items: center;
    }

    .dz-jcx-input {
        display: block;
        font-size: 16px;
        line-height: 1.8em;
        height: 1.8em;
        min-height: 1.8em;
        overflow: hidden;
        width: 30%;
        padding: 5px 9px;
        border: solid 1px #d6d6d6;
    }

    .dz-from-jc {
        display: flex;
        justify-content: space-between;
        width: 100px;
    }

    .dz-from-button {
        margin: 18px;
    }

    .dz-from-bz-text {
        width: 100%
    }

    .dz-from-bz-text textarea {
	    padding: 12px 0;
	    width: 100%;
		font-size: 15px;
		min-height: 30px;
	}

    .dz-from-fj {
        display: flex;
        flex-wrap: wrap;
    }

    .dz-from-fj-edit {
        width: 80px;
        border: solid 1px #efefef;
        display: flex;
        flex-direction: column;
        align-items: center;
        height: 80px;
        color: #adadad;
        font-size: 14px;
        margin-right: 10px;
        justify-content: center;
        position: relative;
        margin-bottom: 10px
    }

    .dz-from-fj-edit .iconfont {
        font-size: 24px;
        margin-bottom: 1px
    }

    .dz-from-fj-img-img {
        width: 80px;
        height: 80px;
    }

    .dz-from-jian {
        position: absolute;
        right: 2px;
        top: 2px;
    }

    .dz-from-jian .iconfont {
        color: rgb(255, 255, 255);
        font-size: 11px;
        transform: rotate(45deg);
        border-radius: 50%;
        padding: 3px;
        background: rgb(68, 138, 255);
    }

    .xunjian-list-r {
        color: #9f9f9f;
        margin-left: 7px;
    }

    .dz-just {
        justify-content: space-between;
        width: 100%;
    }

    .dz-jcx-no {
        background: #4d72ff;
        color: #fff;
        font-size: 12px;
        width: 18px;
        height: 18px;
        border-radius: 2px;
        text-align: center;
        line-height: 18px;
        margin-right: 6px;
    }

    .dz-wei {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 92%;
		border: dashed 2px #e0e0e0;
		padding: 9px;
		margin-top: 12px;
		margin-bottom: 13px;
		font-size: 13px;
	}
    .dz-wei .iconfont {
        font-size: 21px;
        margin-top: 4px;
        margin-right: 1px;
    }

    /* ==================
          模态窗口
  ==================== */

    .cu-modal {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 11111110;
        opacity: 0;
        outline: 0;
        text-align: center;
        -ms-transform: scale(1.185);
        transform: scale(1.185);
        backface-visibility: hidden;
        perspective: 2000 upx;
        background: rgba(0, 0, 0, 0.6);
        transition: all 0.3s ease-in-out 0s;
        pointer-events: none;
    }

    .cu-modal::before {
        content: "\200B";
        display: inline-block;
        height: 100%;
        vertical-align: middle;
    }

    .cu-modal.show {
        opacity: 1;
        transition-duration: 0.3s;
        -ms-transform: scale(1);
        transform: scale(1);
        overflow-x: hidden;
        overflow-y: auto;
        pointer-events: auto;
    }

    .cu-dialog {
        position: relative;
        display: inline-block;
        vertical-align: middle;
        margin-left: auto;
        margin-right: auto;
        width: 680upx;
        max-width: 100%;
        background-color: #fff;
        border-radius: 10upx;
        overflow: hidden;
    }

    .cu-modal.bottom-modal::before {
        vertical-align: bottom;
    }

    .cu-modal.bottom-modal .cu-dialog {
        width: 100%;
        border-radius: 0;
    }

    .cu-modal.bottom-modal {
        margin-bottom: -1000upx;
    }

    .cu-modal.bottom-modal.show {
        margin-bottom: 0;
    }

    .cu-modal.drawer-modal {
        transform: scale(1);
        display: flex;
    }

    .cu-modal.drawer-modal .cu-dialog {
        height: 100%;
        min-width: 200upx;
        border-radius: 0;
        margin: initial;
        transition-duration: 0.3s;
    }

    .cu-modal.drawer-modal.justify-start .cu-dialog {
        transform: translateX(-100%);
    }

    .cu-modal.drawer-modal.justify-end .cu-dialog {
        transform: translateX(100%);
    }

    .cu-modal.drawer-modal.show .cu-dialog {
        transform: translateX(0%);
    }

    .cu-modal .cu-dialog > .cu-bar:first-child .action {
        min-width: 100rpx;
        margin-right: 0;
        min-height: 100rpx;
    }

    .q-input {
        border: solid 1px #eaeaea;
        flex: 1;
        padding: 5px;
    }

    .dz-tiao {
        position: fixed;
        background: #ff8100;
        color: #fff;
        font-size: 16px;
        left: 17px;
        padding: 12px 16px;
        border-radius: 5px;
        bottom: 147px;
        z-index: 11111111;
        box-shadow: 0 2px 6px rgb(255 175 76 / 46%);
    }

    /* ==================
  操作条
==================== */
    .q-input {
        border: solid 1px #ececec;
        width: 89%;
        height: 2rem;
        line-height: 2rem;
        text-align: left;
        padding-left: 12px;
    }

    .q-textarea {
        border: solid 1px #ececec;
        width: 89%;
        text-align: left;
        padding: 10px;

    }

    .cu-btn {
        border: 1px solid #0e88f9;
        border-radius: 5px;
        position: relative;
        /*border: 0rpx;*/
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        padding: 0 30rpx;
        font-size: 28rpx;
        height: 64rpx;
        line-height: 1;
        text-align: center;
        text-decoration: none;
        overflow: visible;
        margin-left: initial;
        transform: translate(0rpx, 0rpx);
        margin-right: initial;
        margin: 0 5px;

    }

    .cu-btn::after {
        display: none;
    }

    .cu-bar {
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
        position: relative;
        -webkit-box-align: center;
        -webkit-align-items: center;
        align-items: center;
        min-height: 136rpx;
        -webkit-box-pack: justify;
        -webkit-justify-content: space-between;
        justify-content: space-between;
    }

    .cu-bar .action {
        display: flex;
        align-items: center;
        height: 100%;
        justify-content: center;
        max-width: 100%;
        margin-right: 13px;
    }

    .cu-bar .content {
        position: absolute;
        text-align: center;
        width: calc(100% - 340rpx);
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
        margin: auto;
        height: 60rpx;
        font-size: 32rpx;
        line-height: 60rpx;
        cursor: none;
        pointer-events: none;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
    }

    .text-green,
    .line-green,
    .lines-green {
        color: #0e88f9;
    }

    .line-green::after,
    .lines-green::after {
        border-color: #0e88f9;
    }

    .bg-green {
        background-color: #0e88f9;
        color: #ffffff;
    }

    .justify-end {
        justify-content: flex-end;
    }

    .q-input {
        border: solid 1px #eaeaea;
        flex: 1;
        padding: 5px;
    }

    .cu-tz {
        display: flex;
        flex-direction: column;
    }

    .cu-title {
        padding: 14px;
    }


    .dz-wei-content{
		padding: 8px 9px;
		width: 94%;
		margin-top: 14px;
		text-align: center;
		background: #fdf7e7;
		font-size: 13px;
		color: #f08002;
	}
	 .right-menu-wrapper{
	    left: 20px;
	}
	.dz-from-button button{
	    background: #4d72ff !important;
	    box-shadow: 0 2px 11px rgb(0 56 216 / 15%);
	    color: #fff !important;
	    border-radius: 30px;
	    font-size: 17px;
	    padding: 2px;
	}
	.xunjian-detail{
	    padding: 14px 0;
	    display: flex;
	    align-items: self-start;
	    background: #fff;
	    border-radius: 5px;
	    box-shadow: 1px 2px 4px rgb(2 2 2 / 5%);
	    width: 93%;
	    margin: 0 auto;
	    margin-bottom: 14px;
	    flex-direction: column;
	}
	.xunjian-detail-title {
		width: 90%;
		margin: 0 auto;
		border-bottom: solid 1px #f3f3f3;
		padding-bottom: inherit;
		font-size: 16px;
		justify-content: space-between;
	}
	.weixiu-b{
	    display: flex;
	    align-items: center;
	    border-top: solid 1px #e5e5e5;
	}
	.weixiu-b button{
		margin: 0;
		flex: 1;
		background: none;
		font-weight: bold;
		color: #999;
		border-radius: 0
	}
	.weixiu-b button::after{border: none;border-radius: 0;}
	.weixiu-b-r{
	    color: #4d72ff !important;
	    border-left: solid 1px #e5e5e5;
	}
	.dz-wei-button{
		background-color: #fff;
		border:none;
	}
	.dz-wei-button::after{ border: none; }
</style>